Nearly all data processing applications involve operations that must be iteratively performed on sets of data. Such program loops may include any number of instructions and may be iterated any number of times as established by the computer program. It is very common to assign values of a first array to a second array based on conditions of a third array. Typically, in order to implement such operations, a program loop is utilized to iteratively assign elements of the first array to elements of the second array dependent upon the corresponding elements of the third array, one element at a time in a scalar manner as shown in FIG. 3.
In the example as shown in FIG. 3, elements of array a[ ] are assigned to array dest[ ] based on the values or conditions of the corresponding elements of array b[ ], one element at a time in the program loop. However, such an implementation is inefficient due to a large amount of iterations and instructions to be executed by a processor.